package org.yonggan.shop.constant

import com.typesafe.config.{Config, ConfigFactory}

/**
  * 配置文件
  */
object ConfigurationManager {

  private val config: Config = ConfigFactory.load()


  /*------------Spark基础参数配置---------------*/
  val ISLOCAL: Boolean = config.getBoolean(ConfConstant.SPARK_LOCAL)
  val MASTER = config.getString(ConfConstant.SPARK_MASTER)


  /*------------Spark作业配置---------------*/
  val TASK_INJSON  = config.getString(ConfConstant.SPARK_TASK_INJSON)


  /*------------Kafka集群配置---------------*/
  val KFK_SERVERS = config.getString(ConfConstant.KFK_SERVERS)
  val KFK_GROUPID = config.getString(ConfConstant.KFK_GROUPID)
  val KFK_TOPIC:Array[String] =  config.getString(ConfConstant.KFK_TOPIC).split(",")


}
